package org.yanh.es.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonGetter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@TableName("es_extra_main")
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class ExtMain {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String word;
    @TableLogic
    private Integer isDeleted=0;
    private LocalDateTime updateTime;
    @JsonGetter("wordDesc")
    public String getWordDesc() {
        return this.word+"的同义词";
    }
}